home *** CD-ROM | disk | FTP | other *** search
/ Essentials of Interactive Physiology / Essentials of Interactive Physiology.iso / pc / files / evaluation / evaluation.dcr / 00001_Movie Scripts.ls next >
Encoding:
Text File  |  2002-04-02  |  2.5 KB  |  97 lines

  1. global goBoss, goDotMan, gsColon, goOSMgr, gsNewName, gzActType, gnetID1, gNetLoadedCast
  2.  
  3. on startMovie
  4.   clearGlobals()
  5.   gsColon = GetPathDelimiter()
  6.   goOSMgr = new(script("Class OSMgr"))
  7.   vsChapter = VOID
  8.   if getRunMode(goOSMgr) = #Browser then
  9.     if not voidp(externalParamName("sw1")) then
  10.       vsActType = externalParamValue("sw1")
  11.       gnetID1 = VOID
  12.       gsNewName = "@" & gsColon & "dswmedia" & gsColon & vsActType & getFileExtension(goOSMgr, #cast)
  13.       gNetLoadedCast = preloadNetThing(gsNewName)
  14.       vzActType = symbol(vsActType)
  15.     else
  16.       gnetID1 = getNetText("javascript:getActCast()")
  17.     end if
  18.     if not voidp(externalParamName("sw2")) then
  19.       vsChapter = externalParamValue("sw2")
  20.     end if
  21.     mCreateBoss(vzActType, vsChapter)
  22.   else
  23.     vzActType = #test
  24.     castLib("evaluation").fileName = "@" & gsColon & "dswmedia" & gsColon & string(vzActType) & getFileExtension(goOSMgr, #cast)
  25.     vsChapter = VOID
  26.     mCreateBoss(vzActType, vsChapter)
  27.     startMod()
  28.     go(2)
  29.   end if
  30. end
  31.  
  32. on evalScript xsParam
  33.   cursor(0)
  34.   case xsParam of
  35.     "donePrint":
  36.       mDonePrint(goBoss)
  37.   end case
  38. end
  39.  
  40. on mCreateBoss xzActType, xsChapter
  41.   goDotMan = new(script("DotManagerParent"), [#firstDotSprite: 1, #numDots: 90])
  42.   if xzActType = #test then
  43.     viNumQuestions = 20
  44.   else
  45.     viNumQuestions = 20
  46.   end if
  47.   goBoss = new(script("quizParent"), goDotMan, xzActType, viNumQuestions, xsChapter)
  48. end
  49.  
  50. on startMod
  51.   vlInfo = [#numAvailable: 35, #numChapters: 26]
  52.   mInit(goBoss, vlInfo)
  53. end
  54.  
  55. on stopMovie
  56.   the actorList = []
  57.   if getRunMode(goOSMgr) = #Authoring then
  58.     castLib("evaluation").fileName = "@" & gsColon & "dswmedia" & gsColon & "eval.cst"
  59.   end if
  60.   mResetDots(goDotMan)
  61. end
  62.  
  63. on ExternalCastExistP xsType
  64.   vbFoundCast = 1
  65.   vsCast = xsType
  66.   vsColon = getColon(goOSMgr)
  67.   vsNewName = "@" & vsColon & "dswmedia" & vsColon & vsCast & getFileExtension(goOSMgr, #cast)
  68.   castLib("CurActCast").fileName = vsNewName
  69.   return vbFoundCast
  70. end
  71.  
  72. on checkNetStuff
  73.   vbReady = 0
  74.   if not voidp(gnetID1) then
  75.     if netDone(gnetID1) then
  76.       vsActCastName = netTextResult(gnetID1)
  77.       if not voidp(vsActCastName) then
  78.         if vsActCastName <> EMPTY then
  79.           ExternalCastExistP(vsActCastName)
  80.           vbReady = 1
  81.         end if
  82.       end if
  83.     end if
  84.   else
  85.     if netDone(gNetLoadedCast) then
  86.       castLib("evaluation").fileName = gsNewName
  87.       vbReady = 1
  88.     end if
  89.   end if
  90.   if vbReady then
  91.     startMod()
  92.     go(2)
  93.   else
  94.     go(the frame)
  95.   end if
  96. end
  97.